package com.example.gestureactivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainActivity extends BaseActivity implements OnClickListener {

	@SuppressWarnings("unused")
	private static final String TAG = "MainActivity";
	private Button mListBtn;
	private Button mGridBtn;
	private Button mWebBtn;
	private Button mMulBtn;
	private Button mSimBtn;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);

		initView();
	}

	private void initView() {
		mSimBtn = (Button) findViewById(R.id.bt_simple_main);
		mSimBtn.setOnClickListener(this);
		mListBtn = (Button) findViewById(R.id.bt_list_main);
		mListBtn.setOnClickListener(this);
		mGridBtn = (Button) findViewById(R.id.bt_grid_main);
		mGridBtn.setOnClickListener(this);
		mWebBtn = (Button) findViewById(R.id.bt_webview_main);
		mWebBtn.setOnClickListener(this);
		mMulBtn = (Button) findViewById(R.id.bt_mul_main);
		mMulBtn.setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		int id = v.getId();
		switch (id) {
		case R.id.bt_simple_main:
			Intent intent0 = new Intent(this, SimActivity.class);
			startActivity(intent0);
			break;
		case R.id.bt_list_main:
			Intent intent1 = new Intent(this, AnotherActivity.class);
			startActivity(intent1);
			break;
		case R.id.bt_grid_main:
			Intent intent2 = new Intent(this, GridActivity.class);
			startActivity(intent2);
			break;
		case R.id.bt_webview_main:
			Intent intent3 = new Intent(this, WebActivity.class);
			startActivity(intent3);
			break;
		case R.id.bt_mul_main:
			Intent intent4 = new Intent(this, MulActivity.class);
			startActivity(intent4);
			break;
		}

	}

	@Override
	void onFlingFinished() {

	}

	@Override
	public boolean onTouch(View v, MotionEvent event) {
		return false;
	}

}
